package com.wangshouyu.mp.user;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2021年03月17日 17:49
 * @description 用户
 */
public class UserInfoRequest implements Serializable {

    /**
     * 用户openId
     */
    @SerializedName(value = "openid")
    @JsonProperty(value = "openid")
    @JSONField(name = "openid")
    private String openId;

    /**
     * 语言
     */
    private String lang;

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getLang() {
        return lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserInfoRequest that = (UserInfoRequest) o;
        return Objects.equals(openId, that.openId) && Objects.equals(lang, that.lang);
    }

    @Override
    public int hashCode() {
        return Objects.hash(openId, lang);
    }

    @Override
    public String toString() {
        return "UserInfoRequest{" +
                "openId='" + openId + '\'' +
                ", lang='" + lang + '\'' +
                '}';
    }
}
